<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8" />
	<meta name="viewport"
		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>企业详情</title>
	<link rel="stylesheet" href="css/mui.min.css" />
	<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
	<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
	<!-- build:css css/app.css -->
	<link rel="stylesheet" href="css/base.css" />
	<link rel="stylesheet" href="css/common.css">
	<!-- endbuild -->
	<style type="text/css">
		.introduction {
			padding: 10px 0;
			margin-top: 5px;
			background: #ffffff;
		}

		.enterprise-introduction .title {
			margin-top: 10px;
			margin-bottom: 16px;
			font-family: PingFangSC-Medium, sans-serif;
			font-size: 20px;
			font-weight: normal;
			letter-spacing: 1px;
		}

		.enterprise-introduction .subtitle {
			margin-bottom: 6px;
			font-size: 18px;
			font-weight: 500;
			color: #222222;
		}

		.enterprise-introduction .desc {
			margin: 0;
			color: #666666;
			font-size: 14px;
			line-height: 1.2;
		}

		.tel,
		.email,
		.address {
			font-size: 15px;
			margin-bottom: 6px;
		}

		.industry-info {
			margin-bottom: 8px;
			width: 100%;
			padding: 8px;
			font-size: 15px;
			border: 1px solid #dddddd;
		}

		.industry-info tr {
			height: 35px;
			border-bottom: 1px solid #dddddd;
		}

		.industry-info tr:nth-child(2n) {
			background: #f7f7f7;
		}

		.industry-info tr td:first-child {
			width: 100px;
			padding-left: 10px;
		}

		.mui-slider-group {
			margin-top: 5px;
		}

		.mui-slider-item {
			height: 184px !important;
			overflow: hidden;
		}

		.mui-slider-item img {
			width: 100%;
			min-height: 184px;
			height: 100%;
		}

		.mui-slider-indicator .mui-indicator {
			margin: 0 4px;
		}
		
		.weui-photo-browser-modal {
			z-index: 2;
		}
	</style>
</head>

<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">企业详情</h1>
	</header>
	<!-- <div class="top">
		<a class="back" href="index.html" >
			<img src="img/icon_hs_fanhuijian.png"  class="img1">
		</a>
		企业介绍
		<img class="shareImg" src="img/icon_zwxq_fx.png"  />
	</div> -->
	<div class="mui-content"></div>
	<script src="js/mui.min.js"></script>
	<script src="js/zepto.min.js"></script>
	<script src="js/template-web.js"></script>
	<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
	<script src="js/swiper.js"></script>
	<!-- build:js js/app.js -->
	<script src="js/api.js"></script>
	<script src="js/tools.js"></script>
	<!-- endbuild -->
	<script>
		window.onload = function () {
			var data = JSON.parse(window.localStorage.getItem('h5_comp'));
			document.title = data['name'];
			if (data) {
				$('.mui-content').html(template('comp', data));
			}
			var photo = $.photoBrowser({
				items: window.template.defaults.imports.toArray(data['photo'])
			});
			$('.mui-slider-item').on('tap', function(e) {
				photo.open($(this).attr('data-id'))
			})
			// 轮播图
			mui('.mui-slider').slider({
				interval: 2000
			});
		}
		// 把图片分割为数组
		template.defaults.imports.toArray = function (value) {
			if (value.indexOf(',')) {
				return value.split(',')
			} else {
				return value
			}
		}
	</script>
	<script id="comp" type="text/html">
		<div class="enterprise-introduction">
			<div class="introduction">
				<div class="content">
					<h1 class="title"><%=name%></h1>
					<p class="subtitle">企业简介</p>
					<p class="desc" style="white-space: pre-wrap;"><%=introduction%></p>
				</div>
			</div>
			<div class="introduction">
				<div class="content">
					<p class="subtitle">办公环境</p>
					<% var img = $imports.toArray(photo)%>
					<% if(img.length > 1){%>
						<div id="slider" class="mui-slider">
							<div class="mui-slider-group">
								<% for(var i = 0; i < img.length; i ++) {%>
									<div class="mui-slider-item" data-id="<%=i%>">
										<a href="javascript:;">
											<img src="<%=img[i]%>"/>
										</a>
									</div>
								<%}%>
							</div>
							<div class="mui-slider-indicator">
								<% for(var i = 0; i < img.length; i ++) {%>
									<div class="mui-indicator mui-active"></div>
								<%}%>
							</div>
						</div>
					<%} else {%>
						<div class="mui-slider-item">
							<img style="width: 100%;" src="<%=photo%>">
						</div>
					<%} %>
				</div>
			</div>
			<div class="introduction">
				<div class="content">
					<p class="subtitle">联系我们</p>
					<p class="tel">电话： <span><%=account%></span></p>
					<p class="email">邮箱： <span><%=email%></span></p>
					<p class="address">地址: <span><%=address%></span></p>
				</div>
			</div>
			<div class="introduction">
				<div class="content">
					<p class="subtitle">工商信息</p>
					<table class="industry-info">
						<tr>
							<td>公司全称</td>
							<td><%=name%></td>
						</tr>
						<tr>
							<td>成立时间</td>
							<td><%=establishedTime%></td>
						</tr>
						<tr>
							<td>注册资本</td>
							<td><%=regisCapital%></td>
						</tr>
						<tr>
							<td>法定代表</td>
							<td><%=examineName%></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</script>
</body>

</html>